package guanqu.beans;

import java.math.BigDecimal;
import java.util.Calendar;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author wangying
 * @date 2015-10-31 历史闸坝水情表
 */
@Entity
@Table(name = "t_HistoryTimeIrrBRWaterDam")
@IdClass(StadiaCodeMeaTimePrimaryKey.class)
public class HistoryIrrBRWaterDam {

	private String stadiaCode; // 测站编码
	private Calendar meaTime; // 采集时间
	// private StadiaCodeMeaTimePrimaryKey stadiaCodeMeaTimePrimaryKey;
	// //测站采集时间联合主键类
	private BigDecimal heightUp; // 闸上水位
	private BigDecimal heightDown; // 闸下水位
	private BigDecimal fluxGate; // 过闸流量
	private BigDecimal openDegree1; // 闸门开度1
	private BigDecimal openDegree2; // 闸门开度2
	private BigDecimal openDegree3; // 闸门开度3
	private BigDecimal openDegree4; // 闸门开度4
	private BigDecimal openDegree5; // 闸门开度5
	private BigDecimal gateOpenCount; // 开闸孔数
	private String gateState; // 操作状态 00:开闸门 01：关闸门 11：清空标志位

	@Transient
	private IrrBRStadia irrBRStadia; // 历史闸坝水情表存在对测站的依赖关系
	// @Id
	// public StadiaCodeMeaTimePrimaryKey getStadiaCodeMeaTimePrimaryKey() {
	// return stadiaCodeMeaTimePrimaryKey;
	// }
	// public void setStadiaCodeMeaTimePrimaryKey(
	// StadiaCodeMeaTimePrimaryKey stadiaCodeMeaTimePrimaryKey) {
	// this.stadiaCodeMeaTimePrimaryKey = stadiaCodeMeaTimePrimaryKey;
	// }

	public BigDecimal getHeightUp() {
		return heightUp;
	}

	public void setHeightUp(BigDecimal heightUp) {
		this.heightUp = heightUp;
	}

	public BigDecimal getHeightDown() {
		return heightDown;
	}

	public void setHeightDown(BigDecimal heightDown) {
		this.heightDown = heightDown;
	}

	public BigDecimal getFluxGate() {
		return fluxGate;
	}

	public void setFluxGate(BigDecimal fluxGate) {
		this.fluxGate = fluxGate;
	}

	public BigDecimal getOpenDegree1() {
		return openDegree1;
	}

	public void setOpenDegree1(BigDecimal openDegree1) {
		this.openDegree1 = openDegree1;
	}

	public BigDecimal getOpenDegree2() {
		return openDegree2;
	}

	public void setOpenDegree2(BigDecimal openDegree2) {
		this.openDegree2 = openDegree2;
	}

	public BigDecimal getOpenDegree3() {
		return openDegree3;
	}

	public void setOpenDegree3(BigDecimal openDegree3) {
		this.openDegree3 = openDegree3;
	}

	public BigDecimal getOpenDegree4() {
		return openDegree4;
	}

	public void setOpenDegree4(BigDecimal openDegree4) {
		this.openDegree4 = openDegree4;
	}

	public BigDecimal getOpenDegree5() {
		return openDegree5;
	}

	public void setOpenDegree5(BigDecimal openDegree5) {
		this.openDegree5 = openDegree5;
	}

	public BigDecimal getGateOpenCount() {
		return gateOpenCount;
	}

	public void setGateOpenCount(BigDecimal gateOpenCount) {
		this.gateOpenCount = gateOpenCount;
	}

	public String getGateState() {
		return gateState;
	}

	public void setGateState(String gateState) {
		this.gateState = gateState;
	}

	@OneToOne
	@JoinColumn(name = "stadiaCode", insertable = false, updatable = false)
	@Transient
	public IrrBRStadia getIrrBRStadia() {
		return irrBRStadia;
	}

	public void setIrrBRStadia(IrrBRStadia irrBRStadia) {
		this.irrBRStadia = irrBRStadia;
	}

	@Id
	public String getStadiaCode() {
		return stadiaCode;
	}

	public void setStadiaCode(String stadiaCode) {
		this.stadiaCode = stadiaCode;
	}

	@Id
	public Calendar getMeaTime() {
		return meaTime;
	}

	public void setMeaTime(Calendar meaTime) {
		this.meaTime = meaTime;
	}

	public HistoryIrrBRWaterDam(BigDecimal heightUp, BigDecimal heightDown, BigDecimal fluxGate) {
		super();
		this.heightUp = heightUp;
		this.heightDown = heightDown;
		this.fluxGate = fluxGate;
	}

	public HistoryIrrBRWaterDam(Calendar meaTime, BigDecimal heightUp, BigDecimal heightDown, BigDecimal fluxGate) {
		super();
		this.meaTime = meaTime;
		this.heightUp = heightUp;
		this.heightDown = heightDown;
		this.fluxGate = fluxGate;
	}

	public HistoryIrrBRWaterDam() {
	}

}
